var io = require('../node_modules/socket.io/node_modules/socket.io-client');

var socket = io('ws://127.0.0.1:3050');
socket.on('connect', function() {
	console.log('connect to server completed.');
	socket.emit('iwant.connect', {uid:'test01'}, function(_confirmed) {
		console.log('ack: ' + _confirmed);
	});
});

socket.on('iwant.message', function(_data, _ack) {
	console.log('receive msg from server: ' + _data.msg);
	_ack(true);
});
